home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / update~4.z / update~4 / lib_stdio_notused_sprintf.c < prev    next >
Encoding:
C/C++ Source or Header  |  1989-09-06  |  601 b   |  35 lines

  1. /*                s p r i n t f
  2.  *
  3.  * Formatted output to a string. A null character will be appended
  4.  * to the string to mark the end of string. The function returns
  5.  * the number of bytes written to the string (excluding the null
  6.  * character).
  7.  *
  8.  * Patchlevel 1.0
  9.  *
  10.  * Edit History:
  11.  */
  12.  
  13. #include "stdiolib.h"
  14.  
  15. /*LINTLIBRARY*/
  16. /*VARARGS2*/
  17. /*ARGSUSED*/
  18.  
  19. int sprintf(buf, fmt, va_alist)
  20.  
  21. char *buf;                /* output buffer */
  22. char *fmt;                /* format */
  23. va_dcl
  24.  
  25. {
  26.   va_list arg;                /* argument vector */
  27.   int v;                /* return value */
  28.  
  29.   va_start(arg);
  30.   v = vsprintf(buf, fmt, arg);
  31.   va_end(arg);
  32.  
  33.   return v;
  34. }
  35.